<template>
  <div class="paper-container">
    <el-container>
    <el-header style="height:inherit;">
      <div class="testTile clearfix">
        <div class="margindis">
          <span class="back el-icon-arrow-left"></span>
          试卷设计
        </div>
        <div class="margindis">用户昵称</div>
      </div>
      <el-form :inline="true" :model="formInline" class="demo-form-inline margindis">
        <el-form-item label="试卷名称">
          <el-input v-model="formInline.user"></el-input>
        </el-form-item>
        <el-form-item label="选择分类">
          <el-select v-model="formInline.region" placeholder="活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="答卷时长">
          <el-input v-model="formInline.user" class="time-input"></el-input>
          &nbsp;分钟
        </el-form-item>
        <el-form-item label="通过分数">
          <el-input v-model="formInline.user" class="time-input"></el-input>
          &nbsp;分
        </el-form-item>
        <span class="el-icon-arrow-up up"></span>
        <div class="write-exam">
          <el-form-item label="笔试说明">
          <el-input type="textarea" v-model="form.desc" class="textarea" resize="none"></el-input>
          </el-form-item>
          <el-form-item>
            <el-badge :value="12" class="item">
            <el-button type="primary" @click="onSubmit" class="btn-padding">保存</el-button>
            </el-badge>
          </el-form-item>
        </div>
      </el-form>
    </el-header>
      <el-container class="container">
        <el-aside width="40%">
          <div class="scroll-bar">
               <el-table class="borderdel"
              :data="tableData2" 
              style="width: 100%"
              >
              <el-table-column
              type="index"
              width="40">
              
              </el-table-column>
              <el-table-column
                prop="word"
                label="姓名"
                width="30">
              </el-table-column>
              <el-table-column
                prop="address"
                label="姓名"
                width="280">
              </el-table-column>
              <el-table-column
                align="right"

                >
                <template slot-scope="scope">
                  <el-input v-model="input" placeholder="分值"></el-input>
                  <i class="el-icon-delete"></i>
                </template>
              </el-table-column>
            </el-table>
              <div style="margin-top: 20px" class="btn-layout">
                <el-badge :value="12" class="item">
                <el-button @click="setCurrent(tableData[1])">手动添加</el-button>
                </el-badge>
                <el-badge :value="12" class="item">
                <el-button @click="setCurrent()">批量导入</el-button>
                </el-badge>
                <el-badge :value="12" class="item">
                <el-button @click="setCurrent()">从我的题库选择</el-button>
                </el-badge>
              </div>
              </div>
              <el-footer style="height: inherit">
                <div style="margin-top: 20px" class="footer">
                  <p>
                    总题数:<span>x</span>道  
                  </p>
                  <p>
                    总分数:<span>x</span>分  
                  </p>
                
                <el-badge :value="12" class="item">
                <el-button type="primary" @click="onSubmit" class="btn-padding">预览</el-button>

                </el-badge>
                <el-badge :value="12" class="item">
                <el-button type="primary" @click="onSubmit" class="btn-padding  btn-margin">提交</el-button>
                </el-badge>
              </div>
              </el-footer>
        </el-aside>
        <el-main>Main</el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script>
export default {
   data() {
      return {
        formInline: {
          user: '',
          region: '',
          
        },
        form:{
          desc: ''
        },
         tableData2: [{
          word: "单",
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          word: "单",
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          word: "单",
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          word: "单",
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          word: "单",
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          word: "单",
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          word: "单",
          address: '上海市普陀区金沙江路 1518 弄'
        }]
      }
      input:''
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      },
    }
};
</script>
<style scoped>
html,body{  /* 这只是组件无html，body只有app.vue里才有 */
}
.paper-container .container{
  position: absolute;
  left: 0;
  right: 0;
  top: 290px;
  bottom: 0;
}
  .margindis{
    margin-left: 20px;
    margin-right: 10px;
  }
  .clearfix::after {
      content: ".";
      clear: both;
      display: block;
      overflow: hidden;
      height: 0;
        }

  .clearfix {
      zoom: 1;
  }
  .el-button {
    background-color: #169BD5;
    color: #fff;
  }  
  .el-header {
    color: #333;
    padding: 0;
  }
  .testTile {
    width: 100%;
    background-color: #F2F2F2;
    margin-bottom: 10px;
    height: 90px;
    box-sizing: border-box;
  }
  .testTile div:first-child {
    float: left;
    margin-top: 60px;
  }
  .testTile div:last-child {
    float: right;
    font-weight: 900;
    margin-top: 30px;
  }
  .el-header>>>.el-input__inner{
    border: 1px solid #797979;
  }
  .el-header>>>.el-textarea__inner{
    border: 1px solid #797979;
  }
  .el-aside {
    color: #333;
    border-left: 1px solid #000;
    border-top: 1px solid #000;
    position: relative;
  }
  .up{
    font-weight: 900;
    float: right;
    padding: 6px;
    margin-right: 12px;
  }
  .write-exam>div:first-child{
    /* width: 100%; */
    width: 58%;
  }
  .write-exam>div:first-child>>>.el-form-item__content {
    width: 92%;
  }
  .scroll-bar {
    overflow-y: scroll;
    width: 100%;
    max-height: 500px;
  }
  .borderdel>>>.el-table_1_column_1 {
    text-align: center;
    color: #fff;
  }
  .borderdel>>>.el-table_1_column_2>.cell{
    padding: 0 4px;
  }
  .borderdel>>>.el-table_1_column_1>.cell>div{
    background-color: #999;
    padding: 0;
    height: 30px;
    width: 30px;
    line-height: 30px;
    border-radius: 50%;
  }
  .borderdel>>>.el-table__body-wrapper {
    overflow: auto;
  }
  .borderdel>>>tr:nth-child(odd){
    background-color: #D7D7D7;
  }
  .el-header .time-input{
      width: 40%;
   }
  .borderdel .el-input{
    width: 12%!important;
    font-size: 12px;
  }
  .borderdel>>>.el-input__inner{
    padding: 0 10px;
  }
  .el-icon-delete{
    font-size: 20px;
  }
  .borderdel>>>.el-table_1_column_6  {
    text-align: right;
  }
  .btn-layout{
    display: flex;
    justify-content: space-around;
  }
  .el-main {
    color: #333;
    text-align: center;
    line-height: 160px;
    border: 1px solid #000;
  }
  .el-footer{
    padding: 0;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    /* margin-top: 20px; */
    position: absolute;
    bottom: 0;
    width: 100%;
  }
  .el-footer>.footer{
    margin-top: 2px!important;
  }
  body > .el-container {
    margin-bottom: 40px;
  }
  
  .back {
    display: inline-block;
    padding: 2px;
    background-color: #999;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
  }
  .el-table .cell{
    padding-left: 30px!important;
  }
  .el-table .warning-row {
    background: #d7d7d7;
  }

  .el-table .success-row {
    background: #f0f9eb;
  }
  .footer p{
    display: inline-block;
  }
  .btn-padding{
    padding: 6px 20px;
  }
  .btn-margin {
    margin-left: 20px;
  }
</style>
<style>
  body{
    margin: 0;
    padding: 0;
  }
  .borderdel.el-table--border td,.borderdel.el-table--border th {
    border-right: 0;
  }
  .borderdel .el-table__header-wrapper{
    height: 0;
  }
</style>

